﻿using Controller.i18n.entity;
using HBase;
using hCommand;
using hconnect;
using Net.http;
using Persistence;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Controller
{
    public class KanBanTaskDisplay : ZtTask
    {
        ICoreStockServer coreStockServer = WMSDalFactray.getDal<ICoreStockServer>();
        ICoreTaskServer coreTaskServer = WMSDalFactray.getDal<ICoreTaskServer>();

        public KanBanTaskDisplay()
        {
            time = 300;
        }
        public override bool excute()
        {
            List<TaskCrane> taskCranes = MyCache.getList<TaskCrane>();
            foreach (var item in taskCranes)
            {
                if (I18nConfig.isLoc(item.src))
                {
                    LedDisplayInInfo(item,item.src);
                }
                else if(I18nConfig.isLoc(item.des))
                {
                    LedDisplayOutInfo(item,item.des);
                }
              
            }

            return true;
        }
        private void LedDisplayInInfo(TaskCrane taskCrane, int no)
        {
            KanBanConnect conn = TaskPool.get<KanBanConnect>(no);
            if ( conn == null)
            {
                return;
            }
            //conn.LedFormatInfoIn
        }
        private void LedDisplayOutInfo(TaskCrane taskCrane, int no)
        {
            KanBanConnect conn = TaskPool.get<KanBanConnect>(no);
            if (conn == null)
            {
                return;
            }
            //conn.LedFormatInfoOut();
        }
    }
}
